import Home from '@/auth/pages/Home'
import ParentView from '@/components/Parent-view'

export default {
  path: '/project-management',
  name: 'project-management',
  meta: {
    icon: 'logo-chrome',
    title: '项目管理'
  },
  component: Home,
  children: [
    {
      path: 'project-info',
      name: 'project-info',
      meta: {
        title: '项目信息',
        notCache: false
      },
      component: () => import('@/views/project-management/ProjectInfo/index')
    },
    //新增
    {
      path: 'add-projectInfo',
      name: 'projectInfo-add',
      meta: {
        title: '新增项目信息',
        notCache: false
      },
      component: () => import('@/views/project-management/ProjectInfo/add.vue')
    },
    //编辑
    {
      path: 'edit-projectInfo/:name/:id/:type',
      name: 'projectInfo-edit',
      meta: {
        title: '编辑项目信息',
        notCache: false
      },
      component: () => import('@/views/project-management/ProjectInfo/edit.vue')
    },
    {
      path: 'project-info/:type/:id/:name',
      name: 'projectInfo-detail',
      meta: {
        title: '项目信息详情',
        notCache: false
      },
      component: () =>
        import('@/views/project-management/ProjectInfo/detail.vue')
    },
    {
      path: 'project-team',
      name: 'project-team',
      meta: {
        title: '项目经理部'
      },
      component: () => import('@/views/project-management/ProjectTeam')
    },
    {
      path: 'project-team-org/:type/:id/:name',
      name: 'project-team-org-add',
      meta: {
        title: route => `${route.params.name}`
      },
      component: () =>
        import('@/views/project-management/ProjectTeam/ProjectTeamOrgAdd.vue')
    },
    {
      path: 'project-team-org/:type/:id/:name',
      name: 'project-team-org-edit',
      meta: {
        title: route => `${route.params.name}`
      },
      component: () =>
        import('@/views/project-management/ProjectTeam/ProjectTeamOrgEdit.vue')
    },
    {
      path: 'project-team-org/:type/:id/:name',
      name: 'project-team-org-detail',
      meta: {
        title: route => `${route.params.name}`,
        notCache: true
      },
      component: () =>
        import(
          '@/views/project-management/ProjectTeam/ProjectTeamOrgDetail.vue'
        )
    },
    {
      path: 'project-team-work/:type/:id/:name',
      name: 'project-team-work-add',
      meta: {
        title: route => `${route.params.name}`
      },
      component: () =>
        import('@/views/project-management/ProjectTeam/ProjectTeamWorkAdd.vue')
    },
    {
      path: 'project-team-work/:type/:id/:name',
      name: 'project-team-work-edit',
      meta: {
        title: route => `${route.params.name}`
      },
      component: () =>
        import('@/views/project-management/ProjectTeam/ProjectTeamWorkEdit.vue')
    },
    {
      path: 'project-team-work/:type/:id/:name',
      name: 'project-team-work-detail',
      meta: {
        title: route => `${route.params.name}`,
        notCache: true
      },
      component: () =>
        import(
          '@/views/project-management/ProjectTeam/ProjectTeamWorkDetail.vue'
        )
    },
    {
      path: 'project-team-dep/:type/:id/:name',
      name: 'project-team-dep-add',
      meta: {
        title: route => `${route.params.name}`
      },
      component: () =>
        import('@/views/project-management/ProjectTeam/ProjectTeamDepAdd.vue')
    },
    {
      path: 'project-team-dep/:type/:id/:name',
      name: 'project-team-dep-edit',
      meta: {
        title: route => `${route.params.name}`
      },
      component: () =>
        import('@/views/project-management/ProjectTeam/ProjectTeamDepEdit.vue')
    },
    {
      path: 'project-team-dep/:type/:id/:name',
      name: 'project-team-dep-detail',
      meta: {
        title: route => `${route.params.name}`,
        notCache: true
      },
      component: () =>
        import(
          '@/views/project-management/ProjectTeam/ProjectTeamDepDetail.vue'
        )
    },
    {
      path: 'project-person',
      name: 'project-person',
      meta: {
        title: '项目人员'
      },
      component: () =>
        import('@/views/project-management/ProjectPerson/index.vue')
    },
    //项目人员添加
    {
      path: 'project-person-add/:type/:deptId/:name',
      name: 'project-person-add',
      meta: {
        title: `项目人员新增`
      },
      component: () =>
        import('@/views/project-management/ProjectPerson/add.vue')
    },
    //项目人员编辑
    {
      path: 'project-person-edit/:type/:deptId/:id/:name',
      name: 'project-person-edit',
      meta: {
        title: route => `${route.params.name}`
      },
      component: () =>
        import('@/views/project-management/ProjectPerson/edit.vue')
    },
    //项目人员详情
    {
      path: 'project-person/:type/:id/:name',
      name: 'project-person-detail',
      meta: {
        title: route => `${route.params.name}`
      },
      component: () =>
        import('@/views/project-management/ProjectPerson/detail.vue')
    },
    //现有人员选择
    {
      path: 'check-person/:name',
      name: 'check-person',
      meta: {
        title: route => `${route.params.name}`
      },
      component: () =>
        import('@/views/project-management/ProjectPerson/CheckPerson.vue')
    },
    {
      path: 'workstation-ledger',
      name: 'workstation-ledger',
      meta: {
        title: '工点台账',
        notCache: false
      },
      component: () =>
        import('@/views/project-management/WorkstationLedger.vue')
    },
    {
      path: 'workstation-ledger-add/:type/:id/:name',
      name: 'ledger-add',
      meta: {
        title: '工点新增',
        notCache: false
      },
      component: () =>
        import(
          '@/views/project-management/WorkstationLedgerProject/add'
        )
    },
    {
      path: 'workstation-ledger-edit/:type/:id/:name',
      name: 'ledger-edit',
      meta: {
        title: '工点编辑',
        notCache: false
      },
      component: () =>
        import(
          '@/views/project-management/WorkstationLedgerProject/edit'
        )
    },
    {
      path: 'workstation-ledger/:type/:id/:name',
      name: 'ledger-detail',
      meta: {
        title: '工点详情',
        notCache: false
      },
      component: () =>
        import(
          '@/views/project-management/WorkstationLedgerProject/detail'
        )
    },
    
    {
      path: 'engineering',
      name: 'engineering',
      meta: {
        title: '工程范围'
      },
      component: ParentView,
      children: [
        {
          path: 'unit-project',
          name: 'unit-project',
          meta: {
            title: '单位工程'
          },
          component: () =>
            import('@/views/project-management/UnitProject/unitProject.vue')
        },
        {
          path: 'unit-project/:type/:id/:name',
          name: 'unit-project-add',
          meta: {
            title: '单位工程新增',
            notCache: false
          },
          component: () =>
            import('@/views/project-management/UnitProject/add.vue')
        },
        {
          path: 'unit-project/:type/:id/:name',
          name: 'unit-project-edit',
          meta: {
            title: '单位工程编辑',
            notCache: false
          },
          component: () =>
            import('@/views/project-management/UnitProject/edit.vue')
        },
        {
          path: 'unit-project/:type/:id/:name',
          name: 'unit-project-detail',
          meta: {
            title: '单位工程详情',
            notCache: false
          },
          component: () =>
            import('@/views/project-management/UnitProject/detail.vue')
        },
        {
          path: 'project-list',
          name: 'project-list',
          meta: {
            title: '选择项目'
          },
          component: () =>
            import('@/views/project-management/UnitProject/projectList')
        },
        {
          path: 'temporary-facility',
          name: 'temporary-facility',
          meta: {
            title: '临建设施'
          },
          component: () =>
            import('@/views/project-management/TemporaryFacility')
        },
        {
          path: 'temporary-facility/:type/:id/:name',
          name: 'temporary-facility-add',
          meta: {
            title: route => `${route.params.name}`
          },
          component: () =>
            import(
              '@/views/project-management/TemporaryFacility/TemporaryFacilityAdd.vue'
            )
        },
        {
          path: 'temporary-facility-import',
          name: 'temporary-facility-import',
          meta: {
            title: '临建设施导入'
          },
          component: () =>
            import(
              '@/views/project-management/TemporaryFacility/TemporaryFacilityImport.vue'
            )
        },
        {
          path: 'workstation-ledger',
          name: 'workstation-ledger',
          meta: {
            title: '工点台账',
            notCache: false
          },
          component: () =>
            import('@/views/project-management/WorkstationLedger.vue')
        },
        {
          path: 'workstation-ledger-import',
          name: 'workstation-ledger-import',
          meta: {
            title: '工点导入'
          },
          component: () =>
            import('@/views/project-management/WorkstationLedgerProject/Import')
        },
        {
          path: 'workstation-ledger-add/:type/:id/:name',
          name: 'ledger-add',
          meta: {
            title: '工点新增',
            notCache: false
          },
          component: () =>
            import(
              '@/views/project-management/WorkstationLedgerProject/add'
            )
        },
        {
          path: 'workstation-ledger-edit/:type/:id/:name',
          name: 'ledger-edit',
          meta: {
            title: '工点编辑',
            notCache: false
          },
          component: () =>
            import(
              '@/views/project-management/WorkstationLedgerProject/edit'
            )
        },
        {
          path: 'workstation-ledger/:type/:id/:name',
          name: 'ledger-detail',
          meta: {
            title: '工点详情',
            notCache: false
          },
          component: () =>
            import(
              '@/views/project-management/WorkstationLedgerProject/detail'
            )
        }
      ]
    }
  ]
}
